﻿@namespace AbpAntDesignBlazorServer.Themes.Basic
@using Volo.Abp.Users
@using Volo.Abp.MultiTenancy
@using Microsoft.Extensions.Localization
@using global::Localization.Resources.AbpUi
@inject ICurrentUser CurrentUser
@inject ICurrentTenant CurrentTenant
@inject IJSRuntime JsRuntime
@inject NavigationManager Navigation
@inject IStringLocalizer<AbpUiResource> L
<AuthorizeView>
    <Authorized>
        <Blazorise.Dropdown>
            <DropdownToggle Color="Blazorise.Color.None">
                @if (CurrentTenant.Name != null)
                {
        <span><i>@CurrentTenant.Name</i>\@CurrentUser.UserName</span> }
                                else
                                {
        <span>@CurrentUser.UserName</span>}
            </DropdownToggle>
            <DropdownMenu>
                @if (Menu != null)
                {
        @foreach (var menuItem in Menu.Items)
        {
        <a class="dropdown-item" href="@menuItem.Url?.TrimStart('~')" target="@menuItem.Target">@menuItem.DisplayName</a>}}
            </DropdownMenu>
        </Blazorise.Dropdown>
</Authorized>
    <NotAuthorized>
        <a class="nav-link" href="/Account/Login">@L["Login"]</a>
    </NotAuthorized>
</AuthorizeView>